package com.njwb.day11.dvd;

import java.util.ArrayList;
import java.util.Map;

public class DvdServiceImpl implements DvdService {
    private static final DvdDaoImpl d=new DvdDaoImpl();
    @Override
    public String add(String name) {
        if (d.add(name)) {
            return "添加成功：" + name;
        } else {
            return "添加失败：" + name;
        }

    }

    @Override
    public String delete(String name) {
     return d.delete(name);
    }

    @Override
    public String select(String name) {
        Dvds dd = d.select(name);
        return (dd != null) ? dd.toString() : "未找到数据";
    }


    @Override
    public String loan(String name) {
        return d.loan(name);
    }

    @Override
    public String returns(String name) {
        return d.returns(name);
    }

    @Override
    public Map<String,Dvds> showdesc() {
        return d.showdesc();
    }
    public void moren(){
        d.moren();
    }

}
